package com.mwh.yuantu.dao;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mwh.yuantu.dao.mapper.PlayerInfoMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mwh.yuantu.entity.PlayerInfoEntity;

/**
 * (PlayerInfo)表数据库访问层
 *
 * @author maweihong
 * @since 2023-11-01 09:47:31
 */
@Service
public class PlayerInfoDao extends ServiceImpl<PlayerInfoMapper , PlayerInfoEntity> {

    @Autowired
	private PlayerInfoMapper playerInfoMapper;


    /**
     * 查询播放器列表
     */
    public List<PlayerInfoEntity> list(){
        return playerInfoMapper.list();
    }

    /**
     * 插入新的播放器
     * @param playerInfo
     * @return
     */
    public int insert(PlayerInfoEntity playerInfo){
        return playerInfoMapper.insert(playerInfo);
    }

    /**
     * 更新播放器
     * @param playerInfo
     * @return
     */
    public int update(PlayerInfoEntity playerInfo){
        return playerInfoMapper.update(playerInfo);
    }

    /**
     * 批量删除播放器
     * @param idArr 主键数组
     * @return
     */
    public int delete(@Param("idArr") String[] idArr){
        return playerInfoMapper.delete(idArr);
    }

    /**
     * 根据主键查询播放器信息
     * @param id 主键
     * @return
     */
    public PlayerInfoEntity selectById(String id){
        return playerInfoMapper.selectById(id);
    }

    /**
     * 根据主键查询播放器内容
     * @param id 主键
     * @return
     */
    public String selectContentById(String id){
        return playerInfoMapper.selectContentById(id);
    }
}

